<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:body>

        <ui:composition template="/resources/template/template.xhtml">

            <ui:define name="content">



                <div  >
                    <h:form>
                        <p:panel header="User Preferences" styleClass="verticalAndHorizontalCentering" >
                            <f:facet name="header" >
                                <h:outputText value="User Preferences" ></h:outputText>
                                <p:spacer height="1" width="30" ></p:spacer>
                                <p:commandButton value="Set" action="#{themeController.saveTheme}"></p:commandButton>
                            </f:facet>

                            <h:panelGrid columns="3" >
                                <h:outputText value="Theme" ></h:outputText>
                                <p:spacer height="1" width="30" ></p:spacer>
                                <p:themeSwitcher style="width:165px" id="defaultSwitcher" value="#{themeController.theme}"
                                                 var="t">
                                    <f:selectItem itemLabel="Choose Theme" itemValue="" />
                                    <f:selectItems value="#{themeController.themes}" />
                                    
                                    <p:column style="width:40%">
                                        <h:outputText styleClass="ui-theme ui-theme-#{t}" />
                                    </p:column>

                                    <p:column>
                                        <h:outputText value="#{t}" />
                                    </p:column>
                                </p:themeSwitcher>
                            </h:panelGrid>




                        </p:panel>
                    </h:form>
                </div>



            </ui:define>

        </ui:composition>

    </h:body>
</html>
